<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>学生界面</title>
<meta name="description" content="这是学生主页">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="../img/njust.ico">
<link rel="stylesheet" href="../amazeui/css/amazeui.min.css" />
<link rel="stylesheet" href="css/admin.css">
<link rel="stylesheet" href="css/app.css">
</head>

<body style="margin-left: 10px; overflow: hidden;">

	<div id="ref_page" class="am-g">

		<div class="tpl-content-page-title" style="margin-bottom: 10px;">得分信息</div>
		<div class="am-panel am-panel-default">
			  <div class="am-panel-bd">
				   <table class="am-table am-table-bordered am-table-radius am-table-centered">
				     <tr>
				     	<th>指导老师打分</th>
				     	<th>答辩组打分</th>
				     	<th>总分</th>
				     </tr>
				     <tr id="score">
				     	<td></td>
				     	<td></td>
				     	<td></td>
				     </tr>
				  </table>
			  </div>
		</div>

	</div>

	<script src="../js/jquery.min.js"></script>
	<script src="../amazeui/js/amazeui.min.js"></script>
	<script src="js/app.js"></script>
	<script type="text/javascript">
		$(function() {
			$.ajax({
				url:'/graduation/studentController/getThisStudentScore',
				type:'get',
				async:false,
				success:function(data){
					if(data!=-1){
						$('#score').find('td').eq(0).text(data);
					}else{
						$('#score').find('td').eq(0).text('还未评分');
					}
				}
			});
			$.ajax({
				url:'/graduation/dabianController/getThisStudentScore',
				type:'get',
				async:false,
				success:function(data){
					if(data!=-1){
						$('#score').find('td').eq(1).text(data);
					}else{
						$('#score').find('td').eq(1).text('还未评分');
					}
				}
			});
			
			var score1=$('#score').find('td').eq(0).text();
			var score2=$('#score').find('td').eq(1).text();
			if(!isNaN(score1)&&!isNaN(score2)){
				var sum=parseInt(score1)+parseInt(score2);
				var grade;
				if(sum>=90){
					grade='优秀';
				}else if(sum<90&&sum>=80){
					grade='良好';
				}else if(sum<80&&sum>=70){
					grade='中等';
				}else if(sum<70&&sum>=60){
					grade='及格';
				}else if(sum<60){
					grade='不及格';
				}
				$('#score').find('td').eq(2).text(sum+'[ '+grade+' ]');
			}
			
		});
	</script>
</body>

</html>